FROM alpine:3

RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories

#RUN apk add --update -t deps curl
#
#RUN curl -L https://get.helm.sh/helm-v3.10.1-linux-amd64.tar.gz -o helm.tar.gz \
#  && tar -zxvf helm.tar.gz \
#  && mv linux-amd64/helm /usr/local/bin/helm \
#  && chmod +x /usr/local/bin/helm
#
#RUN apk del --purge deps \
#  && rm /var/cache/apk/*

COPY helm-v3.10.1-linux-amd64.tar.gz ./linux-amd64.tar.gz

RUN tar -zxvf linux-amd64.tar.gz \
  && mv linux-amd64/helm /usr/local/bin/helm \
  && chmod +x /usr/local/bin/helm \
  && rm linux-amd64.tar.gz